#ifndef CL_DEVICE_INFO
#define CL_DEVICE_INFO

#ifdef _WIN32
    #define CL_CALL __cdecl
    #define CL_API __declspec(dllexport)
#else
    #define CL_CALL
    #define CL_API
#endif

#ifdef __APPLE__
    #include <OpenCL/opencl.h>
#else
    #include <CL/cl.h>
    #include <CL/cl_ext.h>
#endif

#include <iostream>

#define DECLARE_PRIVATE(Class) \
    protected:                      \
    class Class##Private* d_ptr = nullptr;          \
    inline Class##Private* d_func() { return d_ptr; }\
    friend class Class##Private;

class CLDeviceInfo
{
public:
    CLDeviceInfo(cl_device_id deviceid);
    ~CLDeviceInfo();
    cl_device_id deviceID();
    const std::string  &platformName() const;
    const std::string  &deviceName() const;
    const std::string  &driverVersion() const;
    const std::string  &deviceVendor() const;
    bool  doubleFpSupport(std::string &);
    bool  halfFpSupport(std::string &) ;
    cl_device_type deviceType();
    const cl_uint  maxComputeUnit() const ;
    const cl_uint  maxWGSize() const ;
    const cl_ulong maxAllocSize() const;
    std::string infoString();
    DECLARE_PRIVATE(CLDeviceInfo);
};

#endif
